]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Ignore showBanners policy for critical notifications
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 13 Mar 2017 19:32:06 +0000 (20:32 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 13 Mar 2017 23:23:37 +0000 (00:23 +0100)
The critical hint is meant to be used for notifications that must not
be missed - running out of battery being the prime example - so it
makes sense to ignore the policy in that case and make sure to always
show them to the user. This is consistent with blocking normal
notifications while showing a fullscreen window, but letting critical
ones through.

https://bugzilla.gnome.org/show_bug.cgi?id=779974

js/ui/messageTray.js

index 0c7a5e4cdc75faf1cce1853ba06f06b22d25d158..63e6ca18237c6357efbee15447255ac60e8e8145 100644 (file)
@@ -803,7 +803,7 @@ const Source = new Lang.Class({
         notification.acknowledged = false;
         this.pushNotification(notification);
 
-        if (this.policy.showBanners) {
+        if (this.policy.showBanners || notification.urgency == Urgency.CRITICAL) {
             this.emit('notify', notification);
         } else {
             notification.playSound();